package com.hentie.inputlib;

import com.hentie.mathlib.Vector2;

public class SingleTouch {
	
	Vector2 currentPosition = Vector2.Zero();
	Vector2 normalizedPosition = Vector2.Zero();
	boolean isTouching = false;
	public SingleTouch(){}
	//Update the touch
	public  void UpdateTouchVector(float x, float y,float viewWidth, float viewHeight)
	{
		//Update the touch
		currentPosition.Set(x, y);
		normalizedPosition.Set(x/viewWidth, y/viewHeight);
	}
	
	//Sets whether its touching
	public void SetIsTouch(boolean isTouching)
	{
		this.isTouching = isTouching;
	}
	
	public Vector2 GetTouchVector()
	{
		return currentPosition;
	}
	public Vector2 GetNormalizedTouchVector()
	{
		return normalizedPosition;
	}
	//Whether the 
	public boolean IsTouching()
	{
		if(isTouching)
		 return true;
		else
			return false;
	}
	
	public boolean IsNotTouching()
	{
		if(!isTouching)
			 return true;
			else
				return false;
	}
	
	
}
